<?php
//use yii\bootstrap\Nav;
?>
<aside class="main-sidebar">

    <section class="sidebar">


<?php
//https://github.com/mdmsoft/yii2-admin/blob/master/docs/guide/using-menu.md 
//no use
// echo Nav::widget([
//     'items' => mdm\admin\classes\MenuHelper::getAssignedMenu(Yii::$app->user->id)
// ]);
?>

        <?= dmstr\widgets\Menu::widget(
            [
                'options' => ['class' => 'sidebar-menu'],
                'items' => [
                    ['label' => '用户', 'icon' => 'fa fa-user', 'url' => ['/user'],
                        'items' => [
                            ['label' => '用户', 'icon' => 'fa fa-user-md', 'url' => ['/user']],
                            ['label' => '收藏', 'icon' => 'fa fa-heart', 'url' => ['/collection']],
                            ['label' => '充值', 'icon' => 'fa fa-cny ', 'url' => ['/recharge']],
                            ['label' => '支付', 'icon' => 'fa  fa-eur', 'url' => ['/pay']],
                            ['label' => '资金', 'icon' => 'fa fa-dollar', 'url' => ['/fund']], 
                             [
                                'label' => '消息',
                                'icon' => 'fa fa-envelope',
                                'url' => ['/admin-user'],
                                'items' => [
                                    ['label' => '站内信', 'icon' => 'fa fa-comment-o', 'url' => ['/sms-web']],
                                    ['label' => '短信列表', 'icon' => 'fa fa-mobile-phone', 'url' => ['/sms']],
                                    ['label' => '验证码列表', 'icon' => 'fa  fa-commenting', 'url' => ['/sms-code']],
                                   
                                ],
                            ],  
                                                  
                        ],
                    ],
                    ['label' => '订单', 'icon' => 'fa  fa-reorder', 'url' => ['/order'],
                        'items' => [
                            ['label' => '订单', 'icon' => 'fa  fa-pencil-square-o', 'url' => ['/order']],
                            //['label' => '订单详情', 'icon' => 'fa fa-file-code-o', 'url' => ['/order-product']],
                            /*['label' => '购物车', 'icon' => 'fa fa-file-code-o', 'url' => ['/cart']],*/
                        ],
                    ],
                    ['label' => '商品', 'icon' => 'fa  fa-th', 'url' => ['/product'],
                        'items' => [
                            ['label' => '商品', 'icon' => 'fa fa-apple', 'url' => ['/product']],
                            ['label' => '分类', 'icon' => 'fa fa-certificate', 'url' => ['/category']],
                            ['label' => '品牌', 'icon' => 'fa fa-yelp', 'url' => ['/brand']],
                            ['label' => '商品相册', 'icon' => 'fa fa-file-image-o', 'url' => ['/product-gallery']],
                            ['label' => '供应商管理', 'icon' => 'fa fa-arrows-alt', 'url' => ['/company']],
                        ],

                    ],
                    
                    ['label' => '运营', 'icon' => 'fa fa-dashboard', 'url' => ['/post'],
                        'items' => [
                            ['label' => '文章', 'icon' => 'fa  fa-newspaper-o', 'url' => ['/post']],
                            ['label' => '广告管理', 'icon' => 'fa fa-buysellads', 'url' => ['/banner']],  
                            ['label' => '订单统计', 'icon' => 'fa fa-buysellads', 'url' => ['/stast-order']],
                            //['label' => '评论', 'icon' => 'fa fa-file-code-o', 'url' => ['/post-comment']],
                        ],
                    ],
                    // ['label' => '相册', 'icon' => 'fa fa-file-code-o', 'url' => ['/album'],
                    //     'items' => [
                    //         ['label' => '相册', 'icon' => 'fa fa-file-code-o', 'url' => ['/album']],
                    //         ['label' => '图片库', 'icon' => 'fa fa-file-code-o', 'url' => ['/gallery']],
                    //     ],
                    // ],
                    ['label' => '配送管理', 'icon' => 'fa fa-area-chart', 'url' => ['/album'],
                        'items' => [
                            ['label' => '配送方式', 'icon' => 'fa  fa-bus', 'url' => ['/shipping-template']],
                            ['label' => '快递', 'icon' => 'fa fa-truck', 'url' => ['/shipping']],
                            ['label' => '地区', 'icon' => 'fa fa-compass', 'url' => ['/region'],],
                        ],
                    ],


                    ['label' => 'Login', 'url' => ['site/login'], 'visible' => Yii::$app->user->isGuest],
                    [
                        'label' => '系统设置',
                        'icon' => 'fa  fa-cog',
                        'url' => '#',
                        'items' => [ 
                            ['label' => '短信模板', 'icon' => 'fa fa-sitemap', 'url' => ['/template']],
                            ['label' => '数据字典', 'icon' => 'fa fa-book', 'url' => ['/dd'],],
                            
                            ['label' => '友情链接', 'icon' => 'fa fa-link', 'url' => ['/friendlink']],
                            ['label' => '全局配制', 'icon' => 'fa fa-globe', 'url' => ['/systemconfig'],],
                            [
                                'label' => '权限',
                                'icon' => 'fa fa-circle-o',
                                'url' => ['/admin-user'],
                                'items' => [
                                    ['label' => '管理员', 'icon' => 'fa fa-circle-o', 'url' => ['/admin-user'],],
                                    ['label' => '分配权限', 'icon' => 'fa fa-circle-o', 'url' => ['/admin#/assignment'],],
                                    // [
                                    //     'label' => 'Level Two',
                                    //     'icon' => 'fa fa-circle-o',
                                    //     'url' => '#',
                                    //     'items' => [
                                    //         ['label' => 'Level Three', 'icon' => 'fa fa-circle-o', 'url' => '#',],
                                    //         ['label' => 'Level Three', 'icon' => 'fa fa-circle-o', 'url' => '#',],
                                    //     ],
                                    // ],
                                ],
                            ],
                        ],
                    ],
                ],
            ]
        ) ?>

    </section>

</aside>
